package com.YCH.model.mappers.app;

import com.YCH.model.user.pojos.TbUserLvTask;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TbUserLvTaskMapper {
    /**
     *
     * @param openLV
     * @param TYPE 0：返回当前等级可完成任务，1：返回未解锁任务
     * @return
     */
    List<TbUserLvTask> selectAllByOpenLV(@Param("openLV")short openLV, @Param("TYPE")short TYPE);

    Short selectMaxTaskCountById(Integer id);

    Short selectOpenLVById(Integer id);

    TbUserLvTask selectAllById(Integer id);

    public enum Type{
        GREATE((short)1),LESS((short)0),ALL((short)2);
        short code;
        Type(short code){
            this.code = code;
        }
        public short getCode(){
            return this.code;
        }
    }
}